package com.susong.anqing.forever.model.form;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;

/**
 * @author hukai
 * @Package com.susong.anqing.forever.model.form
 * @date 2024/3/1 15:42
 */
@Data
public class HumanForm {

    private Long id;

    private String username;

    private Integer age;

    @Range(min = 0, max = 1, message = "性别只能是男-1 女-0")
    private Integer sex;

    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobile;

    private String address;
}
